package com.rock.upms.model;

import java.io.Serializable;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

public class UpmsDepartment implements Serializable {

	/**
	 * id
	 *
	 * @mbg.generated
	 */
	private Integer id;
	/**
	 * 所属上级
	 *
	 * @mbg.generated
	 */
	private Integer pid;
	/**
	 * 部门编号
	 *
	 * @mbg.generated
	 */
	private String deptCode;
	/**
	 * 部门名称
	 *
	 * @mbg.generated
	 */
	private String deptName;
	/**
	 * 备注
	 *
	 * @mbg.generated
	 */
	private String remarks;
	/**
	 * 创建时间
	 *
	 * @mbg.generated
	 */
	private Date createTime;
	/**
	 * 创建人编号
	 *
	 * @mbg.generated
	 */
	private String createUsercode;
	/**
	 * 创建人姓名
	 *
	 * @mbg.generated
	 */
	private String createUsername;
	/**
	 * 预留字段1
	 *
	 * @mbg.generated
	 */
	private String reserved1;
	/**
	 * 预留字段2
	 *
	 * @mbg.generated
	 */
	private String reserved2;
	/**
	 * 预留字段3
	 *
	 * @mbg.generated
	 */
	private String reserved3;
	/**
	 * 预留字段4
	 *
	 * @mbg.generated
	 */
	private String reserved4;
	/**
	 * 预留字段5
	 *
	 * @mbg.generated
	 */
	private String reserved5;
	/**
	 * 是否删除0-否1是
	 *
	 * @mbg.generated
	 */
	private String isDeleted;
	/**
	 * 顺序号
	 *
	 * @mbg.generated
	 */
	private Integer seqno;
	private static final long serialVersionUID = 1L;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateUsercode() {
		return createUsercode;
	}

	public void setCreateUsercode(String createUsercode) {
		this.createUsercode = createUsercode;
	}

	public String getCreateUsername() {
		return createUsername;
	}

	public void setCreateUsername(String createUsername) {
		this.createUsername = createUsername;
	}

	public String getReserved1() {
		return reserved1;
	}

	public void setReserved1(String reserved1) {
		this.reserved1 = reserved1;
	}

	public String getReserved2() {
		return reserved2;
	}

	public void setReserved2(String reserved2) {
		this.reserved2 = reserved2;
	}

	public String getReserved3() {
		return reserved3;
	}

	public void setReserved3(String reserved3) {
		this.reserved3 = reserved3;
	}

	public String getReserved4() {
		return reserved4;
	}

	public void setReserved4(String reserved4) {
		this.reserved4 = reserved4;
	}

	public String getReserved5() {
		return reserved5;
	}

	public void setReserved5(String reserved5) {
		this.reserved5 = reserved5;
	}

	public String getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(String isDeleted) {
		this.isDeleted = isDeleted;
	}

	public Integer getSeqno() {
		return seqno;
	}

	public void setSeqno(Integer seqno) {
		this.seqno = seqno;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", id=").append(id);
		sb.append(", pid=").append(pid);
		sb.append(", deptCode=").append(deptCode);
		sb.append(", deptName=").append(deptName);
		sb.append(", remarks=").append(remarks);
		sb.append(", createTime=").append(createTime);
		sb.append(", createUsercode=").append(createUsercode);
		sb.append(", createUsername=").append(createUsername);
		sb.append(", reserved1=").append(reserved1);
		sb.append(", reserved2=").append(reserved2);
		sb.append(", reserved3=").append(reserved3);
		sb.append(", reserved4=").append(reserved4);
		sb.append(", reserved5=").append(reserved5);
		sb.append(", isDeleted=").append(isDeleted);
		sb.append(", seqno=").append(seqno);
		sb.append("]");
		return sb.toString();
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		UpmsDepartment other = (UpmsDepartment) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
				&& (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
				&& (this.getDeptCode() == null ? other.getDeptCode() == null : this.getDeptCode().equals(other.getDeptCode()))
				&& (this.getDeptName() == null ? other.getDeptName() == null : this.getDeptName().equals(other.getDeptName()))
				&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
				&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
				&& (this.getCreateUsercode() == null ? other.getCreateUsercode() == null : this.getCreateUsercode().equals(other.getCreateUsercode()))
				&& (this.getCreateUsername() == null ? other.getCreateUsername() == null : this.getCreateUsername().equals(other.getCreateUsername()))
				&& (this.getReserved1() == null ? other.getReserved1() == null : this.getReserved1().equals(other.getReserved1()))
				&& (this.getReserved2() == null ? other.getReserved2() == null : this.getReserved2().equals(other.getReserved2()))
				&& (this.getReserved3() == null ? other.getReserved3() == null : this.getReserved3().equals(other.getReserved3()))
				&& (this.getReserved4() == null ? other.getReserved4() == null : this.getReserved4().equals(other.getReserved4()))
				&& (this.getReserved5() == null ? other.getReserved5() == null : this.getReserved5().equals(other.getReserved5()))
				&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
				&& (this.getSeqno() == null ? other.getSeqno() == null : this.getSeqno().equals(other.getSeqno()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
		result = prime * result + ((getDeptCode() == null) ? 0 : getDeptCode().hashCode());
		result = prime * result + ((getDeptName() == null) ? 0 : getDeptName().hashCode());
		result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
		result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
		result = prime * result + ((getCreateUsercode() == null) ? 0 : getCreateUsercode().hashCode());
		result = prime * result + ((getCreateUsername() == null) ? 0 : getCreateUsername().hashCode());
		result = prime * result + ((getReserved1() == null) ? 0 : getReserved1().hashCode());
		result = prime * result + ((getReserved2() == null) ? 0 : getReserved2().hashCode());
		result = prime * result + ((getReserved3() == null) ? 0 : getReserved3().hashCode());
		result = prime * result + ((getReserved4() == null) ? 0 : getReserved4().hashCode());
		result = prime * result + ((getReserved5() == null) ? 0 : getReserved5().hashCode());
		result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
		result = prime * result + ((getSeqno() == null) ? 0 : getSeqno().hashCode());
		return result;
	}
}